package edu.pitt.cs.cs2410pj2.datamodel;
/**
 * Data structure for one cache block
 * @author zhangfan
 *
 */
public class L1CacheEntry {
	private int state  = State.INVALID;
	private int cacheTag;
	private String data;
	private int updateTime;
	String blockAddr;

	public String getBlockAddr() {
		return blockAddr;
	}

	public void setBlockAddr(String blockAddr) {
		this.blockAddr = blockAddr;
	}

	private int setIndex;
	
	
	public int getSetIndex() {
		return setIndex;
	}

	public void setSetIndex(int setIndex) {
		this.setIndex = setIndex;
	}

	public int getCacheTag() {
		return cacheTag;
	}

	public void setCacheTag(int cacheTag) {
		this.cacheTag = cacheTag;
	}

	public String getData() {
		return data;
	}

	public void setData(String data) {
		this.data = data;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public int getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(int updateTime) {
		this.updateTime = updateTime;
	}
	
	public String toString() {
		String msg = "";
		msg = "L1 BLOCK:  setIndex:"+setIndex+", cacheTag:"+cacheTag+",updateTime:"+updateTime + ",state:"+State.getStateName(state);
		return msg;
	}
}
